package com.glaway.car.context;

import com.glaway.car.entity.Admin;

public class BaseContext {

    public static ThreadLocal<Admin> threadLocal = new ThreadLocal<>();

    public static void setCurrentAdmin(Admin admin) {
        threadLocal.set(admin);
    }

    public static Admin getCurrentAdmin() {
        return threadLocal.get();
    }

    public static void removeCurrentAdmin() {
        threadLocal.remove();
    }

}
